<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/inc/Editer/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/inc/Editer/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/inc/Editer/lang/zh-cn/zh-cn.js"></script>
<div class="main" style="height:auto;">
<div class="info">
	<p class="tt"><a>首页</a>><a href="orderlist.php">订单列表</a>><span>订单信息</span></p>
	<form class="orderedit">
		<input type="hidden" value="{$oid}" name="oid" />
		<input type="hidden" value="{$oid}" name="oid" />
		<p class="p1"><span>订单编号</span><label>{$info[ocode]}</label></p>
		<p class="p1"><span>购买账户</span><label>{$info[uname]}</label></p>
		<p class="p3"><span>商品信息</span><label>{$info[content]}</label></p>
		<p class="p3"><span>支付金额</span><label>{$info[cash]}</label></p>
		<p class="p3"><span>支付方式</span><label>{$payarr[$info[pay]]}</label></p>	
		<p class="p3"><span>收件人</span><label>{$info[tname]}</label></p>
		<p class="p3"><span>联系电话</span><label>{$info[phone]}</label></p>
		{if($info['type']==2)}
			<p class="p3"><span>寄送地址</span><label>{$info[address]}</label></p>
			{if($info['trackcode'])}
			<p class="p3"><span>快递公司</span><label>{$info[trackname]}</label></p>		
			<p class="p3"><span>快递单号</span><label>{$info[trackcode]}</label></p>
			{/if}
		{else}		
		<p class="p3"><span>核销码</span><label>{$info[hxcode]}</label></p>
		{/if}
		<p class="p3"><span>下单时间</span><label>{$info[addtime]}</label></p>
		{if($info['state']>0)}
		<p class="p3"><span>支付时间</span><label>{$info[paytime]}</label></p>
		{/if}
		{if($info['qrtime'])}
		<p class="p3"><span>确认时间</span><label>{$info[qrtime]}</label></p>
		{/if}
		{if($info['sendtime'])}
		<p class="p3"><span>发货时间</span><label>{$info[sendtime]}</label></p>
		{/if}
		{if($info['endtime'])}
		<p class="p3"><span>完成时间</span><label>{$info[endtime]}</label></p>
		{/if}
		{if($info['jhstate']>0)}
		<p class="p3"><span>回寄信息</span></p>	
		<p class="p3"><span>快递公司</span><label>{$info[trackname1]}</label></p>		
		<p class="p3"><span>快递单号</span><label>{$info[trackcode1]}</label></p>
		<p class="p3"><span>回寄时间</span><label>{$info[jhtime]}</label></p>		
		<p class="p3"><span>确认时间</span><label>{$info[jhendtime]}</label></p>
		{/if}
		
		{if($info['type']==2 && $info['state']==2)}
		<p class="p3"><span>快递公司</span><input type="text" name="tckname" placeholder="快递公司名称" /></p>
		<p class="p3"><span>快递单号</span><input type="text" name="tckcode" placeholder="快递单号" /></p>
		{/if}
		{if($info['type']==2 && $info['state']==2)}
		<button type="button" onclick="orderedit();">确认发货</button>
		{/if}
	</form>
	<script src="./js/jquery.js"></script>
	<script>	 
		function orderedit(){
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudel.php?m=g&a=orderedit",
					data:$(".orderedit").serialize(),
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}
						else{
							alert(d[1]);
							window.location.href='orderlist.php?uid={$uid}&state={$state}&code={$code}&tname={$tname}&uname={$uname}&time={$time}&gname={$gname}&page={$page}&cplx={$cplx}&type={$type}';
						}
					}
				});
			}
	</script>
	
</div>
</div>
